-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AZURE TF Check - CKV_AZURE_136 #2331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job 🚀
checkov/terraform/checks/resource/azure/PostgreSQLFlexiServerGeoBackupEnabled.py
Outdated
Show resolved
Hide resolved
from checkov.common.models.enums import CheckResult | ||
|
||
|
||
class TestPostgreSQLFlexiServerGeoBackupEnabled(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please adjust the tests, so they scan real terraform code, like here #2304
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, thanks for the contribution 🚀
* Added check for georedundant PostgreSQLFlexiServer * Added test for GeoRedundant PostgreSQLFlexiServer * Added check for GeoRedundant PostgreSQLFlexiServer * Corrected ClassName * Apply suggestions from code review Co-authored-by: Anton Grübel <anton.gruebel@gmail.com> * Added tests for real terraform code Co-authored-by: Anton Grübel <anton.gruebel@gmail.com> Co-authored-by: Aaditya Nandeshwar <aaditya.nandeshwar@cldcvr.com>
* Added check for georedundant PostgreSQLFlexiServer * Added test for GeoRedundant PostgreSQLFlexiServer * Added check for GeoRedundant PostgreSQLFlexiServer * Corrected ClassName * Apply suggestions from code review Co-authored-by: Anton Grübel <anton.gruebel@gmail.com> * Added tests for real terraform code Co-authored-by: Anton Grübel <anton.gruebel@gmail.com> Co-authored-by: Aaditya Nandeshwar <aaditya.nandeshwar@cldcvr.com>
Hello,
Implementing check for Azure PostgreSQL FlexiServer GeoBackup Enabled in terraform.
Terraform Docs:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server
Note:
If we have not pass the "geo_redundant_backup_enabled" argument in terraform then the check fails, as by default it will not provide backup facility.
If we have pass the "geo_redundant_backup_enabled" argument in terraform with value "false" in terraform template then the check fails, means we have turned off the backup facility.
If we have pass the "geo_redundant_backup_enabled" argument in terraform with value "true" in terraform template then the check passed, means we have turned on the backup facility.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.